//package com.tjetc;
//
//import lombok.AllArgsConstructor;
//import lombok.Data;
//import lombok.EqualsAndHashCode;
//import lombok.NoArgsConstructor;
//
//public class _10InheritExercise {
//    public static void main(String[] args) {
//        /*
//            1. 编写 Computer 类，包含 CPU 、 内存、硬盘等属性，getDetails 方法用于返回 Computer 的详细信息
//            2. 编写 PC 子类，继承 Computer 类，添加特有属性【品牌 brand】
//            3. 编写 NotePad 子类，继承 Computer 类，添加特有属性【color】
//            4. 编写 Test 类，在 main 方法中创建 PC 和 NotePad 对象，分别给对象中特有的属性赋值， 以及从 Computer 类继承的属性赋值，并使用方法并打印输出信息
//
//         */
//        // 对象在输出的时候自动调用toString方法
////        PC pc = new PC("cpu1", "4G", "512G", "mac");
//        PC pc = new PC("mac");
//        System.out.println(pc);
////        NotePad pad = new NotePad("cpu1", "4G", "512G", "red");
//        NotePad pad = new NotePad("red");
//        System.out.println(pad);
//
//
//
//    }
//}
//
//
//@Data
//@AllArgsConstructor
//@NoArgsConstructor
//class NotePad extends Computer {
//    private String color;
//
////    public NotePad() {
////    }
//
////    public NotePad(String cpu, String memory, String disk, String color) {
////        super(cpu, memory, disk);
////        this.color = color;
////    }
//
////    public String getColor() {
////        return color;
////    }
//
////    public void setColor(String color) {
////        this.color = color;
////    }
//
////    @Override
////    public String toString() {
////        return super.toString() + "NotePad{" +
////                "color='" + color + '\'' +
////                '}';
////    }
//}
//
//@Data
//@AllArgsConstructor
//@NoArgsConstructor
//class PC extends Computer{
//    private String brand;
//
////    public String getBrand() {
////        return brand;
////    }
////
////    public void setBrand(String brand) {
////        this.brand = brand;
////    }
//
////    public PC() {
////    }
//
////    public PC(String cpu, String memory, String disk, String brand) {
////        super(cpu, memory, disk);
////        this.brand = brand;
////    }
//
////    @Override
////    public String toString() {
////        return super.toString() + "PC{" +
////                "brand='" + brand + '\'' +
////                '}';
////    }
//}
//
//
//
//@Data
//@AllArgsConstructor
//@NoArgsConstructor
//class Computer {
//    private String cpu;
//    private String memory;
//    private String disk;
//
////    public Computer() {
////    }
//
////    public Computer(String cpu, String memory, String disk) {
////        this.cpu = cpu;
////        this.memory = memory;
////        this.disk = disk;
////    }
//
////    public String getCpu() {
////        return cpu;
////    }
////
////    public void setCpu(String cpu) {
////        this.cpu = cpu;
////    }
////
////    public String getMemory() {
////        return memory;
////    }
////
////    public void setMemory(String memory) {
////        this.memory = memory;
////    }
////
////    public String getDisk() {
////        return disk;
////    }
////
////    public void setDisk(String disk) {
////        this.disk = disk;
////    }
//
//    // 功能类似与getDetail
////    @Override
////    public String toString() {
////        return "Computer{" +
////                "cpu='" + cpu + '\'' +
////                ", memory='" + memory + '\'' +
////                ", disk='" + disk + '\'' +
////                '}';
////    }
//}
//
//
